from kyb_caps import *

#
driver.find_element(By.ID,'com.tal.kaoyan:id/mainactivity_button_mysefl').click() # 点击我
driver.find_element(By.ID,'com.tal.kaoyan:id/activity_usercenter_userheader').click() # 点击头像
driver.find_element(By.ID, 'com.tal.kaoyan:id/activity_myinfo_header_relativelayout').click() # 点击更换头像
driver.find_element(By.XPATH, '/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.GridView/android.widget.LinearLayout[2]/android.widget.RelativeLayout/android.widget.ImageView').click() # 点击图片
driver.find_element(By.ID, 'com.tal.kaoyan:id/save').click()#点击保存
sleep(2)
driver.quit()

